package com.lw;

import java.awt.*;
import java.util.ArrayList;

/**
 * 工具类
 */
public class GameUtils {
    //分数
    static int score = 0;

    //关卡等级
    static int level = 0;

    //按键方向
    static boolean up = false;
    static boolean down = false;
    static boolean left = false;
    static boolean right = false;

    //敌方鱼类集合
    public static java.util.List<Enemy> enemyList = new ArrayList<>();

    public static Image bgImg = Toolkit.getDefaultToolkit().getImage("images/sea.png");//背景图

    public static Image enemy1_img = Toolkit.getDefaultToolkit().getImage("images/enemyFish/fish1_l.png");//朝左的鱼图片
    public static Image enemyr_img = Toolkit.getDefaultToolkit().getImage("images/enemyFish/fish1_r.png");//朝右的鱼图片

    public static Image enemyl_2img = Toolkit.getDefaultToolkit().getImage("images/enemyFish/fish2_l.png");//朝左的鱼图片
    public static Image enemyr_2img = Toolkit.getDefaultToolkit().getImage("images/enemyFish/fish2_r.png");//朝右的鱼图片

    public static Image enemyl_3img = Toolkit.getDefaultToolkit().getImage("images/enemyFish/fish3_l.png");//朝左的鱼图片
    public static Image enemyr_3img = Toolkit.getDefaultToolkit().getImage("images/enemyFish/fish3_r.png");//朝右的鱼图片

    public static Image bossImg = Toolkit.getDefaultToolkit().getImage("images/enemyFish/boss.png");

    public static Image myFishImg_L = Toolkit.getDefaultToolkit().getImage("images/myFish/myfish_left.png");//朝左的鱼图片
    public static Image myFishImg_R = Toolkit.getDefaultToolkit().getImage("images/myFish/myfish_right.png");//朝右的鱼图片

    /**
     * 绘制文字
     */
    public static void drawWord(Graphics g,String str,Color color,int size,int x,int y){
        g.setColor(color);
        g.setFont(new Font("仿宋",Font.BOLD,size));
        g.drawString(str,x,y);
    }

}
